<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
    	/* S(C("CACHE_MEM"));
    	S("name","1111");
    	dump(S("name")); */
        $this->redirect("CNEPAdmin/Login/index");
    }
    
    public function goodsDetail(){
        $goodsID=I("get.goodsID");
        $where['isOn']=1;
         
        $goods=D("Goods")->getGoods($goodsID,$where);
        $this->assign("goods",$goods);
        $this->display();
    
    }
    
    /**
     *  获取消息网页
     */
    public function messageDetailMsg(){
        $data=array(
            "messageID"=>intval(I("get.messageID"))
        );
        if(!isNotEmptyArr($data)) $this->_returnJson(array("result"=>0,"info"=>"missing parameter","code"=>"123"));
    
        $isMessage=D("Message")->getMessage($data['messageID'],array("isOn"=>1));
        //if(!$isMessage) $this->_returnJson(array("result"=>0,"info"=>"message is not exist","code"=>"126"));
        if(!$isMessage){
        	exit('消息不存在或已删除！');
        }
        
        $this->assign("title",$isMessage['title']);
        $this->assign("content",$isMessage['content']);
        $this->display();
    }
    
    public function backBusiness(){
    	$this->display();
    }
}